don't compile unwanted module serial_unix.cc on mac. (#388)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Wed, 7 Aug 2019 13:37:12 +0000 (07:37 -0600)
committerGitHub <noreply@github.com>
Wed, 7 Aug 2019 13:37:12 +0000 (07:37 -0600)
* don't compile serial_unix.cc on mac.

* remove unnecessary conditional in serial_unix.cc

File is no longer in SOURCES for mac, so we don't need to use a
conditional to skip the contents on mac.

gui/app.pro
gui/serial_unix.cc

index 3093de24d47c0be120686cd9201e5a85aae29c00..cb1992bc07ee8090c2d1f421ec07dbf8d3c31bc4 100755 (executable)
@@ -84,9 +84,13 @@ SOURCES += preferences.cc
 SOURCES += processwait.cc
 SOURCES += upgrade.cc
 SOURCES += version_mismatch.cc
-macx:SOURCES += serial_mac.cc
-unix:SOURCES += serial_unix.cc
-windows:SOURCES += serial_win.cc
+unix:!mac {
+  SOURCES += serial_unix.cc
+} else:mac {
+  SOURCES += serial_mac.cc
+} else:windows {
+  SOURCES += serial_win.cc
+}
 
 HEADERS += aboutdlg.h
 HEADERS += advdlg.h
index 4540c5d1e4ad8c53b93c1ea3754a62a50863982c..47f39db8e27e8d3768495b49b87a5679ef6a7d83 100644 (file)
@@ -19,7 +19,6 @@
 //  USA.
 //
 #include "mainwindow.h"
-#if !defined (Q_OS_MAC) // FIXME: find a better way to hide this on Mac.
 
 #ifdef HAVE_UDEV
 #include <libudev.h>
@@ -104,5 +103,3 @@ void MainWindow::osLoadDeviceNameCombos(QComboBox* box)
     }
   }
 }
-
-#endif